﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using IFViewDetail.KuaiQi.Others;
using HCY.CTP.DBShangZheng;
using IFClientDLL;
using IFServerDLL.DB;

namespace IFViewDetail.Ctl.KuaiQi.Others
{
    public partial class CtlCalcDataMyIF : CtlBase
    {
        public CtlCalcDataMyIF()
        {
            InitializeComponent();
        }
        public override void InitTryIF(ITryIF tryIF)
        {
            base.InitTryIF(tryIF);
            //ctlTick1.InitTryIF(tryIF);
            ctlCandle1.InitTryIF(tryIF);
            ctlLineTimeSlot1.InitTryIF(tryIF);
            //tryIF.Calc.DataManager.OnTickChanged += new Action<MyData_IF>(Calc_OnDataMyIF);
            
        }

        //void Calc_OnDataMyIF(MyData_IF obj)
        //{
        //    for (int i = 0; i < bindingSource.Count; i++)
        //    {
        //        MyData_IF x = bindingSource[i] as MyData_IF;
        //        if (x.Instrument == obj.Instrument)
        //        {
        //            bindingSource[i] = obj;
        //            gridView1.RefreshRow(i);
                    
        //            return;
        //        }
        //    }
        //    bindingSource.Add(obj);
        //}

        

        


        
        
    }
}
